package com.haogu.service.impl;

import com.haogu.mapper.HomeCityMapper;
import com.haogu.pojo.HomeCity;
import com.haogu.service.HomeCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("homeCityService")
public class HomeCityServiceImpl implements HomeCityService {
    @Autowired
    private HomeCityMapper homeCityMapper;

    @Override
    public List<HomeCity> search(String name) {
        if (name == null){
            name = "郑州";
        }
        return homeCityMapper.findByName(name);
    }
}
